<template>
  <div>
    <DataVue @search="search" @reload="getList" :table="table" :query="query"></DataVue>
  </div>
</template>

<script setup lang="ts">
import { saasMapList } from "@/api/service/audit/audit";
import DataVue from "./components/DataVue.vue";

const table = useTable<IAudit>();
const query = useQuery<IAudit>({
  orderByColumn: "create_time",
  isAsc: "desc",
  pageSize: 10,
  uid: ""
});
const search = () => {
  query.value.pageNum = 1;
  getList();
};
const getList = async () => {
  const data = await saasMapList(query.value);
  table.value.data = data.rows;
  query.value.total = data.total;
};

onMounted(() => {
  getList();
});
</script>

<style lang="scss" scoped></style>
